package me.helllp.book.concurrent.ch05;

public class RealData implements Data{
	protected final String result;
	
	public RealData(String para) {
		//	模拟一个长时间的操作
		StringBuffer sb = new StringBuffer();
		
		for(int i=0; i<10; i++){
			sb.append(para);
			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
				// TODO: handle exception
			}
		}
		this.result = sb.toString();
	}

	@Override
	public String getResult() {
		return result;
	}
}
